package mornd;

import org.springframework.context.annotation.Scope;
import org.springframework.stereotype.Component;

import javax.annotation.PostConstruct;
import javax.annotation.PreDestroy;

/**
 * @author: mornd
 * @dateTime: 2023/5/5 - 16:12
 */

@Scope("request")
@Component
public class BeanForRequest {
    public BeanForRequest() {
        System.out.println(this + "构造器执行");
    }

    @PostConstruct
    public void init() {
        System.out.println(this + "的init方法执行");
    }

    @PreDestroy
    public void destroy() {
        System.out.println(this + "的destroy方法执行");
    }
}
